<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>首页</title>
    <style>
        body {
            margin: 0;
            padding: 0;
            background: #f0f8ff;
            font-family: 'Helvetica Neue', sans-serif;
            color: #333;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
        }
        .container {
            text-align: center;
            background-color: #ffffff;
            padding: 40px 60px;
            border-radius: 12px;
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
        }
        h1 {
            color: #007BFF;
            margin-bottom: 30px;
        }
        a {
            text-decoration: none;
            color: #007BFF;
            margin: 0 15px;
            font-weight: bold;
        }
        a:hover {
            color: #0056b3;
        }
        .user-info {
            margin-top: 20px;
            font-size: 16px;
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>欢迎来到首页</h1>
        {% if current_user.is_authenticated %}
            <div class="user-info">
                已登录用户: {{ current_user.username }} |
                <a href="{{ url_for('logout') }}">退出</a>
            </div>
        {% else %}
            <a href="{{ url_for('login') }}">登录</a>
            <a href="{{ url_for('register') }}">注册</a>
        {% endif %}
    </div>
</body>
</html>